﻿//yuselenin anquise jihuaña
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Upeu.Matricula.Data.Business;
using Upeu.Matricula.Data.Entities;

namespace Upeu.Matricula.Data.Test.Business
{
    [TestClass]
    public class CursoBusinessTest
    {
        [TestMethod]
        public void TestGetListByFilter()
        {
            var lista = CursoBusiness.GetList("");
            Assert.IsTrue(lista.Count > 0);
        }

        [TestMethod]
        public void TestCreate()
        {
            Curso nuevo = new Curso

            {
                Nombrec = "sdgfdgdfghfd",
                Profesor = "Bill sas",
                Horasc = "12",
                Creditos = "4",
                Costo_curso = "43as",
                Duracion_curso = "343",
                Observaciones = "--"
            };
            Curso t = CursoBusiness.Create(nuevo);
            Assert.IsTrue(t.CursoId != Guid.Empty);
        }

        [TestMethod]
        public void TestUpdate()
        {
            Curso nuevo = new Curso
            {
                CursoId = new Guid("17f1f0b2-99df-e411-84bc-e069958900b1"),
                Nombrec = "M",
                Profesor = "Steve Jobs",
                Horasc = "11",
                Creditos = "3",
                Costo_curso = "435",
                Duracion_curso = "343",
                Observaciones = "--"
            };
            Curso c = CursoBusiness.Update(nuevo);
            Assert.IsTrue(c.CursoId != Guid.Empty);
        }
    }
}
